package com.motus.pm.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import org.springframework.stereotype.Controller;

import com.motus.pm.auth.AuthHelper;
import com.opensymphony.xwork2.ActionSupport;

@Controller
public class ConfigPCAction extends ActionSupport{


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String app;
	
	public String getApp() {
		return app;
	}

	public void setApp(String app) {
		this.app = app;
	}

	/**
	 * 通过alibaba服务器获取用户信息
	 */
	@Override
	public String execute() throws Exception {
	    HttpServletRequest request = ServletActionContext.getRequest();
	    
	    //获取权限配置信息
		String config= AuthHelper.getConfig(request);
		request.setAttribute("config", config);
		return SUCCESS;
	}
	

}
